#ifndef TElidedLabel_H
#define TElidedLabel_H

#include <QLabel>

//! [0]
class TElidedLabel
  : public QLabel
{
  Q_OBJECT

public:
  TElidedLabel(const QString& content, QWidget* parent = 0);

  void setContent(const QString& newText);
  const QString& content() const
  {
    return _content;
  }

protected:
  void resizeEvent(QResizeEvent* event);

private:
  QString elidedText() const;

private:
  QString _content;
};

#endif // TElidedLabel_H
